<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport"
          content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <!--[if lt IE 9]>
    <script type="text/javascript" src="/tb_hello/Public/Admin/js/html5.js"></script>
    <script type="text/javascript" src="/tb_hello/Public/Admin/js/respond.min.js"></script>
    <script type="text/javascript" src="/tb_hello/Public/Admin/js/PIE_IE678.js"></script>
    <![endif]-->
    <link type="text/css" rel="stylesheet" href="/tb_hello/Public/Admin/css/H-ui.css" />
    <link type="text/css" rel="stylesheet" href="/tb_hello/Public/Admin/css/H-ui.admin.css" />
    <link type="text/css" rel="stylesheet" href="/tb_hello/Public/Admin/font/font-awesome.min.css" />
    <link type="text/css" rel="stylesheet" href="/tb_hello/Public/Admin/css/bootstrap.css" />
    <!--[if IE 7]>
    <link href="/tb_hello/Public/Admin/font/font-awesome-ie7.min.css" rel="stylesheet" type="text/css" />
    <![endif]-->
    <title>添加用户</title>
</head>
<body>
<div class="pd-20">
    <div class="Huiform">
        <form action="/tb_hello/index.php/Admin/useradded" method="post">
            <table class="table table-bg">
                <tbody>
                <tr>
                    <th width="100" class="text-r"><span class="c-red">*</span>
                        用户名：</th>
                    <td>
                        <input type="text" style="width:200px"
                               class="input-text" value="" placeholder="" id="user-name"
                               name="username" datatype="*2-16" nullmsg="用户名不能为空" ajaxurl="/tb_hello/index.php/Admin/usercheck">

                    </td>
                </tr>
                <tr>
                    <th width="100" class="text-r"><span class="c-red">*</span>
                        密码：</th>
                    <td><input type="password" style="width:200px"
                               class="input-text" value="" placeholder="" id="password"
                               name="password" datatype="*6-16 " nullmsg="密码不能为空"></td>
                </tr>
                <tr>
                    <th width="100" class="text-r"><span class="c-red">*</span>
                        确认密码：</th>
                    <td><input type="password" style="width:200px"
                               class="input-text" value="" placeholder="" id="password1"
                               name="password1" datatype="*2-16 " nullmsg="请再次输入密码" recheck="password" errormsg="您两次输入的密码不一致"></td>
                </tr>
                <tr>
                    <th width="100" class="text-r"><span class="c-red">*</span> 特征码：</th>
                   <td>
                    <input type="text" style="width:200px"
                           class="input-text" value="" placeholder="" id="signature"
                           name="signature" datatype="*" nullmsg="特征码不能为空" >
                    </td>
                </tr>

                <tr>
                    <th class="text-r"><span class="c-red">*</span>类型：</th>
                    <td>

                        <div class="radio">
                            <label><input type="radio" name="type" value="1" checked/>测试用户</label>
                            <label><input type="radio" name="type" value="2"/>正式用户</label>
                        </div>
                    </td>
                </tr>
                <tr>
                    <th class="text-r"><span class="c-red">*</span>添加有效期：</th>
                    <td>
                        <input type="number" style="width:200px"
                               class="input-text" value="1" placeholder="" id="time"
                               name="time" datatype="n " nullmsg="请添加有效期" readonly></td>
                    </td>
                </tr>





                <tr>
                    <th></th>
                    <td><button class="btn btn-success radius" type="submit" >
                        <i class="icon-ok"></i> 确定
                    </button>
                    </td>
                </tr>
                </tbody>
            </table>
        </form>
    </div>
</div>

<script type="text/javascript" src="/tb_hello/Public/Admin/js/jquery.min.js"></script>
<script type="text/javascript" src="/tb_hello/Public/Admin/js/Validform_v5.3.2_min.js"></script>
<script type="text/javascript" src="/tb_hello/Public/Admin/js/H-ui.js"></script>
<script type="text/javascript" src="/tb_hello/Public/Admin/js/H-ui.admin.js"></script>

<script type="text/javascript" src="/tb_hello/Public/Admin/layer/layer.min.js"></script>

<script type="text/javascript">
    $(".Huiform").Validform();

    $(":radio").click(function(){
        if ($(this).val() == "1"){
            $('#time').attr("readonly",true);
        }else {
            $('#time').attr("readonly",false);
        }
    });
</script>

    <?php if($addtype == 1): ?><script type="text/javascript">
        alert("添加成功");
        var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
        parent.layer.close(index); //再执行关闭
    </script><?php endif; ?>

</body>
</html>